\input texinfo @c -*-texinfo-*-

@setfilename imbrications.info

@syncodeindex pg cp

@node Top,First node,(dir)
@top Test some command imbrications
@menu
* First node::    node 1
* name:Second node.    node 2
@end menu
@c * node in table::
@c * node in example::
@c * node in flushright::
@c *node in defun -> bug
@node First node
@chapter first node chapter

@cindex elem

@tex

$$ 
\chi^2 = \sum_{i=1}^N
\left(y_i - (a + b x_i)
\over \sigma_i\right)^2 
$$

@end tex

@node Second node
@chapter second

Some text

@deffn Function buffer-end flag
A nice function

makeinfo accepts a menu within defun but it isn't possible
to follow it

@menu
* node within defun menu::
@end menu
@c makeinfo accepts the following but cannot properly close defun
@c @node node within defun menu
@c @section within menu

end of the function
@end deffn

@node node within defun menu
@section the node is within menu

Test @@option inside @@emph
Foo @emph{emphasized and referring to @option{--some} option}.

Table imbricated in code:@*
@code{
in code
@table @emph
@item line
text
@end table
}
                           
ref with uref within:@*                                                     
@ref{(file)node, cross ref with uref @uref{href://http/myhost.com/index.html,uref1}, title with uref2 @uref{href://http/myhost.com/index2.html,uref2}, info file with uref3 @uref{href://http/myhost.com/index3.html,uref3}, printed manual with uref4 @uref{href://http/myhost.com/index4.html,uref4}}

footnote with code within:@*                                                                                
@footnote{ in footnote  @code{par1
                                                                                
par2}}

Refs in samp:@*

Refs without samp: empty section name see @ref{other node}.
With a chapter: @ref{Second node}.

A ref in samp to a node with empty section name:
see @samp{@ref{other node}}.

Same but to a regular node associated with a chapter:
see @samp{@ref{Second node}}.

code with table and example within:@*                                                    
@code{
in code
@table @emph
@item line
in code and table
@example
  in example
@end example
@end table
}


@table @bullet
@item item
@c @node node in table
@c @chapter in table
@end table

@example
@c @node node in example
@c @chapter example

an example
@end example

@cindex other entry

@example
@html

Some html <code>some code</code>.

@end html
after html in example


two line breaks
Tex doesn't like math in @@example
@ifnottex
@tex

$$ 
\chi^2 = \sum_{i=1}^N
\left(y_i - (a + b x_i)
\over \sigma_i\right)^2 
$$

@end tex
@end ifnottex
@cindex index in example

Now a content within example

@contents

@printindex cp
printindex  works but cannot be followed in info, in TeX
the result is quite strange.

and now yes---now and ``so''.

@end example
after example and now yes---now and ``so''.
@flushright

is the text
flushed right ?
@c @node node in flushright
@c @chapter flushright


@end flushright

@flushright
@example
text flushed  right and then example

it should be flushed
@end example
@end flushright

@example
@flushright
example and then text flushed  right
@end flushright
@end example

@display
simple displayed text
@end display

a display within example
@example
example
@display
display
@end display
@end example

@cartouche
A cartouched text
@end cartouche

A cartouche within example
@example
example
@cartouche
A cartouched text
@end cartouche
@end example

An example with table, multitable, quotation, enumerate 
@example
a table within example
@table @bullet
@item item
text
@end table
a multitable
@multitable {a} {b}
@item beginnin

@item @dots{}
@tab 

a new column                          no splitting ???????????????????                             
@end multitable

a menu
@menu
* node menu::      a node in menu

in menu comment
html
@html
<cite>cite me</cite> a cite in html
@end html

A ref in samp in menu comment to a node with empty section name:
@samp{@ref{other node}}.

Same but to a regular node associated with a chapter:
@samp{@ref{Second node}}.

* a menu name:other node. 
      description of other
      node

@end menu

A quotation
@quotation
This is a pre
quotation

@end quotation

Enumerate

@enumerate
@item first item
@item second  item

still second
@end enumerate

@end example

example with deff-like commands
@example
deffs
@defun {my def} args @var{arg} @dots{}
@defunx {other def} no args
@deffnx {type} {name} and now the args
@defvar {variables} variable-name

@defvarx {variables too} other-variable
THis is the defvar

A table within the def
@table @asis
@item item
text

more text
@item second item
@end table

explanation
@end defvar
@end deffn
@end defun

@end example

table within display within example
@example
@display
@table @asis
@item item
Line
@end table
@end display
@end example

table within example within display
@display
@example
@table @asis
@item item
Line
@end table
@end example
@end display

@node  node menu
@unnumberedsubsec
@node other node
@unnumberedsubsec


@contents
@bye
